//---------------------------------------------------------------------------

#ifndef TSlopeH
#define TSlopeH

#include "TProfile.h"
#include "TSwitch.h"
#include "TCurve.h"

//---------------------------------------------------------------------------

class TSlope      //TVertical Slope
{
public:
   __property float Length = { read=FLength, write=FLength };
   __property float Grade = { read=FGrade, write=FGrade };
   __property float Begin = { read=FBegin, write=FBegin };
   __property float End = { read=FEnd, write=FEnd };

   __fastcall TSlope();
   TSlope & __fastcall operator = (const TSlope & t);
protected:
private:
   float FLength;
   float FGrade;
   float FBegin;
   float FEnd;
};


//---------------------------------------------------------------------------
class TSlopes : public vector<TSlope>
{
public:
   float Length;

   TSlopes & operator = (const TSlopes & t);
   bool __fastcall Initialize(TProfile P, TSwitches S, TCurves C);
   unsigned short WhichSlopes(const float Pos);
   __fastcall TSlopes();
private:
//Todo 2 -o Li Wenjian : These functions Convert have some problem. There are many Slope in the Slopes.
   bool __fastcall Convert(const TSwitches Switches);
   bool __fastcall Convert(const TProfile Profile);
   bool __fastcall Convert(const TCurves Curves);
};



#endif
